<?php $this->load->view('header', $head); ?>

<div data-role="page" id="page-login">
	<div data-role="header">
		<h1>로그인</h1>
		<a href="<?=site_url('')?>" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
	</div><!-- /header -->
	
	<div data-role="content" >	
		<?=form_open('ajax/login', array('class' => 'ajax-form'))?>
			<?=form_hidden('redirect_to', $this->load->get_var('redirect_to'))?>
			<ul data-role="listview" data-inset="true" data-theme="c">
				<li data-role="fieldcontain" class="ui-hide-label">
					<label for="username">Username:</label>
					<input type="text" name="username" id="username" value="<?=set_value('username')?>" placeholder="Username"/>
					<?=form_error('username')?>
				</li>
				<li data-role="fieldcontain" class="ui-hide-label">
					<label for="password">Password:</label>
					<input type="password" name="password" id="password" value="" placeholder="Password"/>
					<?=form_error('password')?>
				</li>
				<li class="ui-body">
					<div class="ui-grid-a">
						<div class="ui-block-a">
							<a href="<?=site_url('user/register')?>" data-role="button" data-theme="b">회원가입</a>
						</div>
						<div class="ui-block-b">
							<input type="submit" value="로그인"/>
						</div>
					</div>	
				</li>
			</ul>
			<?=validation_errors()?>
		<?=form_close()?>
	</div><!-- /content -->
	<div data-role="footer" data-position="fixed">
		<?php $this->load->view('navbar', array('active' => 'login')) ?>
	</div>
</div>

<?php $this->load->view('footer'); ?>
